package com.jingbian.cppccbackend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 会议表，用于存储会议基本信息
 * </p>
 *
 * @author yezi
 * @since 2025-02-26
 */
@Getter
@Setter
@ToString
@EqualsAndHashCode
public class Meetings implements Serializable {

    private static final long serialVersionUID = 1L;


    @TableId(value = "mid", type = IdType.AUTO)
    private Integer mid;


    private String title;


    private String introduction;


    private String organizer;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime endTime;

    private String location1;


    private String location2;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createdAt;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updatedAt;


    /**
     * 总参与者数量
     */
    @TableField(exist = false)
    private Integer totalParticipants;

    /**
     * 已签到数量
     */
    @TableField(exist = false)
    private Integer signedCount;

    @TableField(exist = false)
    private String signStatus;  // 新增签到状态字段

    private Boolean isMeeting;

}
